package com.aclass.xqx.classscreen.utlis

import android.content.Context
import android.content.SharedPreferences

/**
 * 判断用户是不是第一次进入
 *
 * SharePreference 封装
 *
 */
object PrefUtild {

    fun getString(context: Context, key: String, defValue: String): String? {
        val sp = context.getSharedPreferences("class", Context.MODE_PRIVATE)
        return sp.getString(key, defValue)
    }

    fun setString(context: Context, key: String, value: String) {
        val sp = context.getSharedPreferences("class", Context.MODE_PRIVATE)
        sp.edit().putString(key, value).commit()
    }
}
